package com.example.imtoken.entitys.app

class WalletsEntity : Cloneable {

    var id = 0
    var coin: String? = null
    var name: String? = null
    var key: String? = null
    var money: Int = 0
    var money1: Int = 0
    var imgResId: Int = 0
    var content: String? = null
    var imageUrl: String? = null
    var select: Boolean = false

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as WalletsEntity

        if (id != other.id) return false
        if (coin != other.coin) return false
        if (name != other.name) return false
        if (key != other.key) return false
        if (money != other.money) return false
        if (money1 != other.money1) return false
        if (imgResId != other.imgResId) return false
        if (content != other.content) return false
        if (imageUrl != other.imageUrl) return false
        if (select != other.select) return false

        return true
    }

    override fun hashCode(): Int {
        var result = id
        result = 31 * result + (coin?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (key?.hashCode() ?: 0)
        result = 31 * result + money
        result = 31 * result + money1
        result = 31 * result + imgResId
        result = 31 * result + (content?.hashCode() ?: 0)
        result = 31 * result + (imageUrl?.hashCode() ?: 0)
        result = 31 * result + select.hashCode()
        return result
    }

    public override fun clone(): WalletsEntity {
        return super.clone() as WalletsEntity
    }
}